package com.hoshiicloud.saleorder.feign;

import com.hoshiicloud.common.rpc.Response;
import com.hoshiicloud.saleorder.feign.hystrix.HystrixUserFeignFallback;
import java.util.Map;

import com.hoshiicloud.user.entity.store.PlatStore;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

/**
 * @author: Markerccc
 * @date: 2019/7/22 - 11:21
 */
@FeignClient(name = "hoshiicloud-user", fallback = HystrixUserFeignFallback.class)
public interface UserService {

    /**
     * 获取账户信息
     *
     * @param id
     * @return
     */
    @GetMapping("/accountInfo/{id}")
    Response<Map<String, Object>> accountInfo(@PathVariable("id") Long id);


    /**
     * 获取店铺详情
     * @param id 店铺ID
     * @return Response<PlatStoreDTO>
     */
    @GetMapping(value = "/store/plat-store/{id}")
    Response<PlatStore> queryById(@PathVariable("id") Long id);
}
